﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using fmtx.Framework.DALFactory;
using com.fmtx.IDal;
using com.fmtx.Model;

namespace website.Areas.Website.Controllers
{
    [HandleError]
    public class HomeController : BaseController
    {
        private IArticle article = DataAccess<IArticle>.GetObject();
        //
        // GET: /website/Home/

        public ActionResult Index()
        {
            
            ViewBag.newlist = article.QueryNew(5);
            ViewBag.hostlist = article.QueryHost(5);
            ViewBag.praiselist = article.QueryPraise(5);
            string keyword;
            ViewBag.todaylist = ArticleCache.GetListByKeyword(10, out keyword);
            ViewBag.keyword = keyword;
            ViewBag.piclist = PictureCache.GetListByKeyword(5);
            return View();
        }


    }
}
